<?php !defined('INC') && exit('Load failure!'); ?>
{#include file='include/top.php'}

<link href="{DIR.T}css/content.css" rel="stylesheet" type="text/css" />

<div class="w_960">
	{#include file="block/left.php"}
	
	<div class="w_700 fr mb10">

	<div class="nav mb10">
		<strong>当前位置</strong> |	 <a title="首页" href="{DIR}">首页</a> | 
		{@res.join table1='%s_content_categroy_bind' table2='%s_content_categroy' field2='name,url,norder' on='cid' where="t1.id={$info['id']}" number='1' order='norder asc'}
		{#foreach($res as $rs)}
		<a href="{DIR}{$rs[url]}" title="{$rs[name] code='quote'}">{$rs[name]}</a> | 
		{#endforeach}
		<a href="{DIR}{$info['url']}" title="{$info[name] code='quote'}">{$info['name']}</a>
	</div>

	<div class="f_2_a pa10 mb10">

	<h1 class="h1">{$info['name']}</h1>
	<div class="author">
	<span>{$info[date] date='Y-m-d H:i'} 时发表</span>
	<span>浏览量：{@res table='%s_content' field='hit' where="id={$info[id]}" }
		{#foreach($res as $rs)}
		{$rs[hit]}
		{#endforeach}
	</span>
	</div>
	
	<div class="content">
		{$info['content'] code='html'}
	</div>

	<div class="contentpage">
		{$pagelist code='html'}
	</div>
	
	{@res.join table1='%s_content_tag_bind' table2='%s_content_tag' field2='tagname,url' on='tid' where="t1.id={$info['id']}"}
	{#if(!empty($res))}
	<div class="tag_wrap">
		<span>TAG：</span>
		{#foreach($res as $rs)}
		<a href="{DIR}{$rs[url]}" title="{$rs[tagname] code='quote'}">{$rs[tagname]}</a>
		{#endforeach}
	</div>	
	{#endif}
	
	  <div class="tool">
		<ul>
		  <li><a href="javascript:window.print()" class="print">打印本文</a></li>
		  <li><a href="javascript:shutwin()" class="close">关闭本页</a></li>
		  </ul>
		</div>

	<div class="updown pa15">
		{@res.join table1='%s_content' table2='%s_content_categroy_bind' field1='title,url' on='id' where="t1.mid=1 and t1.status=1 and t1.id < {$info['id']}" order='t1.id desc' number='1'}
		{#if(!empty($res))}
		{#foreach($res as $rs)}
		<p><strong>上一篇：</strong><a href="{DIR}{$rs[url]}" title="{$rs[title] code='quote'}">{$rs[title] size='80'}</a></p>
		{#endforeach}
		{#else}
		<p><strong>下一篇：</strong><a href="javascript:;">这是第一篇文章了</a></p>
		{#endif}
		{@res.join table1='%s_content' table2='%s_content_categroy_bind' field1='title,url' on='id' where="t1.mid=1 and t1.status=1  and t1.id > {$info['id']}" number='1'}
		{#if(!empty($res))}
		{#foreach($res as $rs)}
		<p><strong>下一篇：</strong><a href="{DIR}{$rs[url]}" title="{$rs[title] code='quote'}">{$rs[title] size='80'}</a></p>
		{#endforeach}
		{#else}
		<p><strong>下一篇：</strong><a href="javascript:;">这是最后一篇文章了</a></p>
		{#endif}	
	</div>

	</div>

	</div>
</div>

{#include file='include/bottom.php'}

</body>
</html>